﻿//++
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
// Module Name:
//
//  IOcsEndpointProxy.cs
//    
// Abstract:
//
//  This interface abstacts the behavior of classes that need to act
//  as an endpoint with OCS.
//  
//--

using System;
using Microsoft.Rtc.Collaboration;

namespace Microsoft.EnhancedReminders.Dispatcher
{
    /// <summary>
    /// This interface abstacts the behavior of classes that need to act
    /// as an endpoint with OCS.
    /// </summary>
	public interface IOcsEndpointProxy
	{
        /// <summary>
        /// Event Handler for notifying listeners when the registration state of the
        /// SIP endpoint has changed.
        /// </summary>
        event EventHandler<LocalEndpointStateChangedEventArgs> RegistrationStateChanged;

        /// <summary>
        /// Synchronously initialize the OcsEndpointProxy. This includes setting up the
        /// CollaborationPlatform and establishing the CollaborationEndpoint.
        /// </summary>
        void Initialize();

        /// <summary>
        /// Synchronously disconnects from OCS and shuts down the Collaboration Platform.
        /// </summary>
        void Uninitialize();

        /// <summary>
        /// Creates a new Conversation for implementations of IMessageSender to use
        /// </summary>
        Conversation CreateConversation(string targetAddress);

        /// <summary>
        /// Obtains an appropriate subclass of IPresenceProvider for doing presence
        /// lookups.
        /// </summary>
        /// <returns>An instance of IPresenceProvider.</returns>
        IPresenceProvider CreatePresenceProvider();
	}
}
